package tx.algoritmiek.week2;

public class GameObject {
    public static final int DIMENSION = 2;
    private double[] position = new double[DIMENSION];

    public GameObject(double x, double y) {
        position[0] = x;
        position[1] = y;
    }
    
    /**
     * 
     * @param index 0 = X, 1 = Y
     * @return Coordinate
     */
    public double getPosition( int index ) {
        return position[index];
    }
    
    public String toString() {
        return "(" + position[0] + ", " + position[1] + ")";
    }
}
